<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!--返回错误信息-->
<?php echo validation_errors(); ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <?php
    $title = [
        'title' => '供应商采购统计明细',
    ];
    $this->load->view('/admin/common/header', $title);
    ?>
</head>

<body data-type="widgets">
<script src="/assets/js/theme.js"></script>
<div class="am-g tpl-g">

    <?php $this->load->view('/admin/common/bodyLeft'); ?>
    <script type="text/javascript">
        $(".js-sidebar-nav>li:nth-child(11)>ul, .js-sidebar-nav>li:nth-child(11)>ul>li:nth-child(3)>ul").show(80);
        $(".js-sidebar-nav>li:nth-child(11)>a>span, .js-sidebar-nav>li:nth-child(11)>ul>li:nth-child(3)>a>span").addClass("sidebar-nav-sub-ico-rotate");
        $(".js-sidebar-nav>li:nth-child(11)>ul>li:nth-child(3)>a, .js-sidebar-nav>li:nth-child(11)>ul>li:nth-child(3)>ul>li:nth-child(1)>a").addClass("active");
    </script>
    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="row-content am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title  am-cf">
                                <ol class="am-breadcrumb am-breadcrumb-slash">
                                    <li><a href="/admin/statement/order?page=1&type=gys">供应商采购订单统计</a></li>
                                    <li><a href="/admin/statement/outAndPutBySupplier?page=1">出出库按供应商统计</a></li>
                                    <li class="am-active">供应商商品出库详情</li>
                                </ol>
                            </div>
                        </div>
                        <form action="/admin/stock/confirm" method="post" enctype="multipart/form-data" class="am-form am-text-sm">
                            <div class="widget-body  am-fr">
                                <div class="tpl-table-black-operation">
                                    <a href="javascript:void(0);" class="tpl-table-black-operation-del">
                                        供应商信息
                                    </a>
                                </div>

                                <div style="margin-top: 20px">
                                    <div class="am-g">
                                        <!-- Row start -->
                                        <div class="am-u-sm-12 am-g-fixed">
                                            <div class="am-g">
                                                <div class="am-u-md-6">
                                                    <!--                                                    <form class="am-form am-text-sm">-->
                                                    <div class="am-form-group am-u-md-12 ">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0 must"
                                                               for="code">商品编号</label>
                                                        <div class="am-u-md-10">
                                                            <input type="text" name="code" value="<?php echo $list['product_no'] ?>"
                                                                   id="code" readonly>
                                                        </div>

                                                    </div>

                                                    <div class="am-form-group am-u-sm-12">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0 must">商品分类</label>
                                                        <div class="am-u-md-10">
                                                            <select  id="firstClassify" disabled="disabled" class="unlock" name="oneCategory" data-am-selected="{btnWidth: '32%'}">
                                                                <option value=""></option>
                                                                <?php
                                                                switch ($list['one_category']){
                                                                    case 2:
                                                                        echo '<option  value="2" selected>物料包</option>
                                                                              <option value="3">书籍</option>
                                                                              <option value="4">机器耗材</option>
                                                                              <option value="8">供应商商品</option>
                                                                              <option value="9">打印机租赁</option>';
                                                                        break;
                                                                    case 3:
                                                                        echo '<option value="2" >物料包</option>
                                                                              <option value="3" selected>书籍</option>
                                                                              <option value="4">机器耗材</option>
                                                                              <option value="8">供应商商品</option>
                                                                              <option value="9">打印机租赁</option>';
                                                                        break;
                                                                    case 4:
                                                                        echo '<option value="2">物料包</option>
                                                                              <option value="3">书籍</option>
                                                                              <option value="4" selected>机器耗材</option>
                                                                              <option value="8" >供应商商品</option>
                                                                              <option value="9" >打印机租赁</option>';
                                                                        break;
                                                                    case 8:
                                                                        echo '<option value="2">物料包</option>
                                                                              <option value="3">书籍</option>
                                                                              <option value="4">机器耗材</option>
                                                                              <option value="8" selected>供应商商品</option>
                                                                              <option value="9" >打印机租赁</option>';
                                                                        break;
                                                                    case 9:
                                                                        echo '<option value="2" >物料包</option>
                                                                              <option value="3" >书籍</option>
                                                                              <option value="4" >机器耗材</option>
                                                                              <option value="8" >供应商商品</option>
                                                                              <option value="9" selected>打印机租赁</option>';
                                                                        break;
                                                                }

                                                                ?>
                                                            </select>
                                                            <select  id="secondClassify" disabled="disabled" name="twoCategory" data-am-selected="{btnWidth: '32%'}">
                                                                <?php
                                                                foreach ($list['two_category_name'] as $k=>$v){
                                                                    if($v['id'] == $list['two_category']){
                                                                        echo '<option value="'.$v['id'].'" selected>'.$v['name'].'</option>';
                                                                    }else{
                                                                        echo '<option value="'.$v['id'].'">'.$v['name'].'</option>';

                                                                    }
                                                                }
                                                                ?>

                                                            </select>
                                                            <select  id="thirdClassify" disabled="disabled" name="threeCategory" data-am-selected="{btnWidth: '32%'}">
                                                                <?php
                                                                foreach ($list['three_category_name'] as $k=>$v){
                                                                    if($v['id'] == $list['three_category']){
                                                                        echo '<option value="'.$v['id'].'" selected>'.$v['name'].'</option>';
                                                                    }else{
                                                                        echo '<option value="'.$v['id'].'">'.$v['name'].'</option>';

                                                                    }
                                                                }
                                                                ?>

                                                            </select>
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group am-u-md-12 ">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0 must"
                                                               for="linkMan">是否启用规格</label>
                                                        <div class="am-u-md-10">
                                                            <input type="text" name="linkMan" value="<?php echo $list['is_can_size'] ?>"
                                                                   id="linkMan" disabled="disabled">
                                                        </div>


                                                    </div>

                                                    <div class="am-form-group am-u-md-12 ">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0 must"
                                                               for="address">商品价格</label>

                                                        <div class="am-u-md-10 am-margin-vertical-sm">
                                                            <input type="text" name="address" id="address" value="<?php echo $list['price'] ?>" disabled="disabled"/>
                                                        </div>


                                                    </div>
                                                    <!--                                                    </form>-->
                                                </div>

                                                <div class="am-u-md-6">
                                                    <!--                                                    <form class="am-form am-text-sm">-->
                                                    <div class="am-form-group am-u-md-12 ">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0 must"
                                                               for="name">商品名称</label>
                                                        <div class="am-u-md-10">
                                                            <input type="text" name="name" value="<?php echo $list['name']?>"
                                                                   id="name" disabled="disabled">
                                                        </div>


                                                    </div>

                                                    <div class="am-form-group am-u-md-12 ">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                               for="supplierPass">商品单位</label>
                                                        <div class="am-u-md-10">
                                                            <input type="text" name="supplierPass" value="<?php echo $list['goodsUnit']?>"
                                                                   id="supplierPass" disabled="disabled">
                                                        </div>

                                                    </div>

                                                    <div class="am-form-group am-u-md-12 ">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0 must"
                                                               for="phone">商品条形码</label>
                                                        <div class="am-u-md-10">
                                                            <input type="text" name="phone" value="<?php echo $list['jbarcode']?>"
                                                                   id="phone" disabled="disabled">
                                                        </div>


                                                    </div>


                                                    <div class="am-form-group am-u-md-12 ">
                                                        <label class="am-u-md-2 am-md-text-right am-padding-left-0 must"
                                                               for="phone">所属供应商</label>
                                                        <div class="am-u-md-10">
                                                            <input type="text" name="phone" value="<?php echo $list['supplier']?>"
                                                                   id="phone" disabled="disabled">
                                                        </div>


                                                    </div>


                                                    <!--                                                    </form>-->
                                                </div>
                                            </div>
                                        </div>
                                        <!-- Row end -->
                                    </div>
                                    <hr>
                                </div>

                                <div class="tpl-table-black-operation">
                                    <a href="javascript:void(0);" class="tpl-table-black-operation-del">
                                        商品出库列表
                                    </a>
                                </div>

                                <div style="margin-top: 20px">
                                    <div class="am-u-sm-12">
                                        <table width="100%"
                                               class="am-table am-table-compact am-table-striped tpl-table-black "
                                               id="example-r">
                                            <thead>
                                            <tr>
                                                <th width="5%">序号</th>
                                                <th width="15%">商品编码</th>
                                                <th width="10%">商品名称</th>
                                                <th width="15%">商品规格</th>
                                                <th width="5%">单位</th>
                                                <th width="10%">出库数量</th>
<!--                                                <th width="10%">出库单价</th>-->
                                                <th width="10%">出库金额</th>
                                                <th width="20%">出库时间</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php

                                            foreach ($goodsMessage as $k=>$v){
//                                                $time = isset($v['time']) ? $v['time'] : '';
                                                    echo '<tr class="line">
                                              
                                                   <td class="order">'.$v['order'].'</td>
                                                <td data-id="'.$v['dataId'].'" class="product_no">'.$v['product_no'].'</td>
                                                <td class="name">'.$v['name'].'</td>
                                                <td class="specification"   >'.$v['specification'].'</td>
                                                <td class="goodsUnit">'.$v['goodsUnit'].'</td>';

                                                    echo '<td>
                                                    <div class="am-u-md-12">
                                                        <input  type="text" name="" class=" quantity" value="'.$v['quantity'].'" disabled="disabled">
                                                    </div>
                                                </td>
                                                <td class="price-all">'.$v['priceAll'].'</td>';
//                                                    if($time){
                                                        echo '<td class="time">'.date('Y-m-d',$v['time']).'</td>';
//                                                    }else{
//                                                        echo '<td class="time"></td>';
//                                                    }

                                              echo '</tr>';





//                                                    有出库单价的和出库备注的
//                                                    echo '<td>
//                                                    <div class="am-u-md-12">
//                                                        <input  type="text" name="" class=" quantity" value="'.$v['quantity'].'" disabled="disabled">
//                                                    </div>
//                                                </td>
//                                                <td>
//                                                    <div class="am-u-md-12">
//                                                        <input  type="text" name="" class=" price" value="'.$v['price'].'" disabled="disabled">
//                                                    </div>
//                                                </td>
//                                                <td class="price-all">'.$v['priceAll'].'</td>
//
//                                                <td>
//                                                    <div class="am-u-md-12">
//                                                        <input  type="text" name="" class="remarks" value="'.$v['remarks'].'" disabled="disabled">
//                                                    </div>
//                                                </td>
//                                            </tr>';

                                            }


                                            ?>
                                            <!-- more data -->
                                            </tbody>
                                        </table>
                                        <hr>
<!--                                        <div class="btn-box">-->
<!---->
<!--                                            <button onclick="back()" type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success " style="width:220px">取消</button>-->
<!--                                        </div>-->
                                    </div>
                                </div>

                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
<script>
    function back() {
        window.history.back();
    }
</script>

<script src="/assets/js/amazeui.min.js"></script>
<script src="/assets/js/amazeui.datatables.min.js"></script>
<script src="/assets/js/dataTables.responsive.min.js"></script>
<script src="/assets/js/app.js"></script>
</body>

</html>